package com.ruoyi.system.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "aliyun.oss")
public class OSSConfig {
    /**
     * 端点
     */
    private String endpoint;
    
    /**
     * 访问密钥ID
     */
    private String accessKeyId;
    
    /**
     * 访问密钥密码
     */
    private String accessKeySecret;
    
    /**
     * 存储桶名称
     */
    private String bucketName;
    
    /**
     * 域名（可选，用于生成URL）
     */
    private String domain;
    
    /**
     * URL过期时间（分钟）
     */
    private Integer expireTime = 30;

    private String dateFormat = "yyyyMMdd";

    // OSS客户端连接配置
    private Integer maxConnections = 1024;
    private Integer socketTimeout = 50000;
    private Integer connectionTimeout = 50000;
    private Integer connectionRequestTimeout = 1000;
    private Long idleTime = 60000L;
}